package com.atguigu.mall.seckill.scheduled;

import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @author zststart
 * @create 2022-06-18 20:43
 */
//@EnableAsync//开启异步功能
@Slf4j
@Component
//@EnableScheduling
public class HelloSchedule {
    @Async
    @Scheduled(cron = "* * * * * ?")
    public void hello(){
        log.info("hello...");
    }
}
